<!--#layout("common/page.html",{"jsBase":"/space/js/","title":"首页"}){  -->
<blockquote class="layui-elem-quote">信息列表</blockquote>
<div class="bg-white padding-small">
    <!--#
        var limit = parameter.limit!10;
        var member = platform.getCurrentMember();
    -->
    <!--# if (false) { -->
        <layui:cmsArticleList var="articlePage" tagValue="${parameter.tag}" memberId="${member.id}" catalogId="${ stringUtil.toString(catalog.id!)}" orderby="show_time desc, create_time desc,id desc" page="${parameter.page!'1'}" pageSize="${ stringUtil.toString(limit)}">
            <ul class="list-box">
                <!--#
                for(article in articlePage.list) {
                -->
                <li>
                    <a href="${ctxPath}/article.do?id=${article.id}" title="${article.title}" target="_blank">${article.title}</a>
                    <a type="button " class="float-right btn-tips layui-btn layui-btn-sm text-white margin-left-small" data-title="修改信息" href="${ctxPath}/space/article.do?id=${article.id}"><i class="layui-icon layui-icon-edit"></i></a>
                    <a type="button " class="float-right btn-tips layui-btn layui-btn-sm text-white article_del" data-title="删除信息" href="javascript:void(0)" articleId="${article.id}"><i class="layui-icon layui-icon-delete"></i></a>
                </li>
                <!--#} -->
            </ul>
            <!--#if (articlePage.totalPage > 1) {  -->
            <div id="page" class="align-center"></div>
            <script>
                layui.use(['laypage'],function() {
                    var laypage = layui.laypage;
                    //完整功能
                      laypage.render({
                        elem: 'page'
                        ,count: ${articlePage.totalRow!0}
                        ,curr:${parameter.page!1}
                        ,limit:${limit}
                        ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
                        ,jump: function(obj,first){
                          //首次不执行
                          if(!first){
                              if (obj.limit == '${limit}') {
                                  document.location.href="?${util.parameters()}&page=" + obj.curr;
                              } else {
                                  document.location.href="?${util.parameters()}&page=" + obj.curr + "&limit=" + obj.limit;
                              }
                          }
                        }
                      });
                })
            </script>
        <!--# }  -->
        </layui:cmsArticleList>
    <!--# } -->
    <ul id="articleListView" member_id="${member.id}" limit="5" class="article-list list-box">
    </ul>
    <script id="articleListTpl" type="text/html">
        {{#  layui.each(d.data, function(index, item){ }}
        <li>
            <a href="${ctxPath}/article.do?id={{item.id}}" title="{{item.title}}" target="_blank">{{item.title}}</a>
            <a type="button " class="float-right btn-tips layui-btn layui-btn-sm text-white margin-left-small" data-title="修改信息" href="${ctxPath}/space/article.do?id={{item.id}}"><i class="layui-icon layui-icon-edit"></i></a>
            <a type="button " class="float-right btn-tips layui-btn layui-btn-sm text-white article_del" data-title="删除信息" href="javascript:void(0)" articleId="{{item.id}}"><i class="layui-icon layui-icon-delete"></i></a>
        </li>
        {{#  }); }}
        {{#  if(d.count > d.limit) { }}
        <li>
            <div id="articlePage" class="align-center"></div>
        </li>
        {{# }}}
    </script>

    <script>
        layui.extend({
            articles : '{/}${tpl}/layuiExts/member/articles'
        }).use(['articles'],function() {

        });
    </script>
</div>
<!--#}  -->
